//
//  TFCollectionViewColumnLayoutDefines.swift
//
//  Created by Andney Jack on 2021/6/21.
//

import UIKit

@objc public enum TFCollectionViewItemRenderDirection: Int {
    case shortestFirst, leftToRight, rightToLeft, columnFirst
}

public let TFCollectionElementKindSectionHeader: String = "TFCollectionElementKindSectionHeader"
public let TFCollectionElementKindSectionFooter: String = "TFCollectionElementKindSectionFooter"

@objc public protocol TFCollectionViewDelegateColumnLayout: UICollectionViewDelegate {
    @objc func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, sizeForItemAt indexPath: IndexPath, columnWidth: CGFloat) -> CGSize

    @objc optional func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, columnCountForSection section: Int) -> Int

    @objc optional func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, heightForHeaderInSection section: Int) -> CGFloat
    @objc optional func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, heightForFooterInSection section: Int) -> CGFloat

    @objc optional func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, insetForSectionAt section: Int) -> UIEdgeInsets
    @objc optional func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, insetForHeaderInSection section: Int) -> UIEdgeInsets
    @objc optional func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, insetForFooterInSection section: Int) -> UIEdgeInsets

    @objc optional func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, interitemSpacingForSectionAt section: Int) -> CGFloat
    @objc optional func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, columnSpacingForSectionAt section: Int) -> CGFloat

    @objc optional func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, itemRenderDirectionForSectionAt section: Int) -> TFCollectionViewItemRenderDirection

    @objc optional func collectionView(_ collectionView: UICollectionView, layout: TFCollectionViewColumnLayout, shouldPinToVisibleBoundsForSupplementaryViewOfKind kind: String, section: Int) -> Bool
}
